<template>
  <el-select
    v-model="localValue"
    @change="handleChange">
    <el-option v-for="(item,index) in areaOptions" :key="index"
               :label="item.name" :value="item.id">
    </el-option>
  </el-select>
</template>

<script>
export default {
    props: {
        value: {
            type: String,
            default: ''
        }
    },
    data() {
        return {
            localValue: [],
            properties: {
                value: 'id',
                label: 'name'
            }
        };
    },
    computed: {
        areaOptions() {
            return this.$store.state.business.area;
        }
    },
    methods: {
        handleChange(item) {
            this.$emit('input', item);
        }
    }
};
</script>

<style scoped>

</style>
